Platform Explorer / Nuxeo Platform 2021.25

Component org.nuxeo.ecm.core.schema.ObjectResolverService

Documentation

This components allows to extend XSD field definition by providing a way to resolve simple type as external entity references.

Resolution Order

140
The resolution order represents the order in which this component has been resolved by the Nuxeo Runtime framework.
You can influence this order by adding "require" tags in your component declaration, to make sure it is resolved after another component.

Start Order

788
The start order represents the order in which this component has been started by the Nuxeo Runtime framework.
This number is interesting to tweak if your Java component interacts with other components, and needs to be started before or after another one.
It can be changed by implementing the method "Component#getApplicationStartedOrder()" on your Java component: components are sorted according to this reference value, in increasing order.
The default value is 1000, and the repository initialization uses number 100. Negative values can also be used.

Implementation

Class: org.nuxeo.ecm.core.schema.types.resolver.ObjectResolverServiceImpl

Services

Extension Points

XML Source

<?xml version="1.0"?>

<component name="org.nuxeo.ecm.core.schema.ObjectResolverService" version="1.0.0">
  <documentation>
    This components allows to extend XSD field definition by providing a way to resolve simple type as
    external entity references.
  </documentation>

  <service>
    <provide interface="org.nuxeo.ecm.core.schema.types.resolver.ObjectResolverService" />
  </service>

  <implementation class="org.nuxeo.ecm.core.schema.types.resolver.ObjectResolverServiceImpl" />

  <extension-point name="resolvers">

    <documentation>
      Extension Point to register an external entity resolver. You must provide an XSD type derived from xs:string and
      registered under namespace http://www.nuxeo.org/ecm/schemas/core/external-references/. The resolver class must
      implement org.nuxeo.ecm.core.schema.types.resolver.ObjectResolver.
      Example :
      <resolver type="productReference" class="org.mycompany.product.ProductNuxeoResolver" />

      By default, a constraint is added to documents about to be saved in order to validate if the property reference
      an existing external entity. You can disable this validation by setting attribute validation to false, for instance:
      <code xmlns:xs="http://www.w3.org/2001/XMLSchema"
            xmlns:ref="http://www.nuxeo.org/ecm/schemas/core/external-references/">
        <xs:element name="lastContributor">
          <xs:simpleType>
            <xs:restriction base="xs:string" ref:resolver="userManagerResolver" ref:type="user" ref:validation="false" />
          </xs:simpleType>
        </xs:element>
      </code>
    </documentation>

    <object class="org.nuxeo.ecm.core.schema.types.resolver.ObjectResolverDescriptor" />

  </extension-point>

</component>